//
//  UIButton+UIButtonExtend.m
//  etionUI
//
//  Created by wu jingxing on 13-3-29.
//  Copyright (c) 2013年 GuangZhouXuanWu. All rights reserved.
//

#import "UIButtonExtend.h"

@implementation UIButton (UIButtonExtend)

- (void)SetTitle:(NSString *)szTitle
{
    [self setTitle:szTitle forState:UIControlStateNormal];
//    self.titleLabel.text=szTitle;
}

- (NSString *)GetTitle
{
    return [self titleForState:UIControlStateNormal];
}

- (NSString*)title
{
    return [self titleForState:UIControlStateNormal];
}

- (void)SetImage:(UIImage *)image
{
    [self setImage:image forState:UIControlStateNormal];
}

- (UIImage *)GetImage
{
    return [self imageForState:UIControlStateNormal];
}

- (void)SetBackgroundImage:(UIImage *)image
{
    [self setBackgroundImage:image forState:UIControlStateNormal];
}

- (UIImage *)backgroundImage
{
    return [self backgroundImageForState:UIControlStateNormal];
}

- (void)SetFont:(UIFont *)font
{
    self.titleLabel.font = font;
}

- (UIFont*)GetFont
{
    return self.titleLabel.font;
}

-(void)SetTextAlignment:(NSTextAlignment)textAlignment
{
    self.titleLabel.textAlignment = textAlignment;
}

-(void)SetTextLineBreakMode:(NSLineBreakMode)lineBreakMode
{
    self.titleLabel.lineBreakMode = lineBreakMode;
}

- (void)SetTitleColor:(UIColor *)color
{
//    self.titleLabel.textColor=color;
    [self setTitleColor:color forState:UIControlStateNormal];
}

- (void)SetAttributedTitle:(NSAttributedString*)attributeString
{
    [self setAttributedTitle:attributeString forState:UIControlStateNormal];
}

@end
